﻿/**
 * Copyright (C) 2011 original author and authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGuice.Inject.Spi
{
    //complete!
    /// <summary>
    /// 由于C#泛型没有通配符，因此使用此标记接口解决泛型通配符问题。
    /// <remarks>
    /// 通常认为一个注入器包含的可注入成员是泛型参数T的子类，但事实并非如此。这个问题和依赖倒置一样，可注入器
    /// 包含的成员注入列表，是泛型T参数的超类！因为只有超类成员，才允许子类T的注入赋值！
    /// </remarks>
    /// </summary>
    public interface InjectionListener
    {
        void AfterInjection(object injectee);
    }
    /// <summary>
    /// 用于注入到指定类型I中实例的监听器。用于执行后置注入初始化等操作
    /// </summary>
    public interface InjectionListener<I>
    {
        /// <summary>
        /// 在NGuice注入域或方法后调用
        /// </summary>
        /// <param name="injectee"></param>
        void AfterInjection(I injectee);
    }
}
